package cn.mxz.service;

import cn.mxz.pojo.Orders;
import cn.mxz.pojo.ResultData;
import cn.mxz.pojo.ShoppingCart;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 小毛
 * @Date 2021/12/4 11:00
 * @Remark 佛祖保佑永无bug~
 */
public interface OrderService {
    //查询用户对应的订单
    ResultData selectByUserId(String userId);

    //查询对应状态的订单
    ResultData selectByStatus(String userId,String status);

    //删除对应订单
    ResultData deleteByOrderId(String orderId);

    //添加订单
    ResultData insertOrder(List<ShoppingCart> cartlist, String name, String mobile, String province, String city, String area, String addr,String userId);

    //查询对应id的订单
    ResultData<Orders> selectByOrderId(String orderId);

    //将对应id的订单改为”待发货“
    ResultData changeStatus(String orderId);

    //将对应id的订单改为”待收货“
    ResultData faHuo(String orderId);

    //将对应id的订单改为“待评价”
    ResultData shouHuo(String orderId);
}
